{{# var user = d.session.user || {} }}

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta property="qc:admins" content="01676642316411516375" />
<meta name="keywords" content="{{ lay.base.keywords }}">
<meta name="description" content="{{ lay.base.description }}">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{{ lay.base.title }}</title>
{{ include common/link }}
</head>
<body>

{{ include common/header }}

<div class="main layui-clear">
  <div class="wrap">
    <div class="content">
      <div class="fly-tab fly-tab-index">
        <span>
          <a href="/jie/">全部</a>
          <a href="/jie/unsolved/" {{d.status == 'unsolved' ? 'class="tab-this"' : '' }}>未结帖</a>
          <a href="/jie/solved/" {{d.status == 'solved' ? 'class="tab-this"' : '' }}>已采纳</a>
          <a href="/jie/wonderful/" {{d.status == 'wonderful' ? 'class="tab-this"' : '' }}>精帖</a>
          {{# if(user.id){ }}
          <a href="/user/">我的帖</a>
          {{# } }}
        </span>
        <form action="http://cn.bing.com/search" class="fly-search">
          <i class="iconfont icon-sousuo"></i>
          <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转" type="text" name="q">
        </form>
        <a href="/jie/add/" class="layui-btn jie-add">发布问题</a>
      </div>
      
      <ul class="fly-list fly-list-top">
      {{# var jie = d.jie || [];
      jie.forEach(function(item, index){ 
        var jie_user = item.user||{};
        if(item.stick > 0){
      }}
        <li class="fly-list-li">
          <a href="/u/{{168*jie_user.id}}" class="fly-list-avatar">
            <img src="{{jie_user.avatar}}" alt="{{jie_user.username}}">
          </a>
          <h2 class="fly-tip">
            <a href="/jie/{{item.id}}.html">{{= item.title}}</a>
            {{ item.stick > 0 ? '<span class="fly-tip-stick">置顶</span>' :'' }}
            {{ item.status == 1 ? '<span class="fly-tip-jing">精帖</span>' : ''}}
          </h2>
          <p>
            <span><a href="/u/{{168*jie_user.id}}">{{jie_user.username}}</a></span>
            <span>{{lay.time(item.time, true)}}</span>
            <span>{{ lay.base.classes[item.class]||'Layui' }}</span>
            <span class="fly-list-hint"> 
              <i class="iconfont" title="回答">&#xe60c;</i> {{item.comment}}
              <i class="iconfont" title="人气">&#xe60b;</i> {{item.hits}}
            </span>
          </p>
        </li>
      {{# } 
      }); }}
      </ul>


      <ul class="fly-list">
      {{# var jie = d.jie || [];
      jie.forEach(function(item, index){ 
        var jie_user = item.user||{};
        if(item.stick <= 0){
      }}
        <li class="fly-list-li">
          <a href="/u/{{168*jie_user.id}}" class="fly-list-avatar">
            <img src="{{jie_user.avatar}}" alt="{{jie_user.username}}">
          </a>
          <h2 class="fly-tip">
            <a href="/jie/{{item.id}}.html">{{= item.title}}</a>
            {{ item.stick > 0 ? '<span class="fly-tip-stick">置顶</span>' :'' }}
            {{ item.status == 1 ? '<span class="fly-tip-jing">精帖</span>' : ''}}
          </h2>
          <p>
            <span><a href="/u/{{168*jie_user.id}}">{{jie_user.username}}</a></span>
            <span>{{lay.time(item.time, true)}}</span>
            <span>{{ lay.base.classes[item.class]||'Layui' }}</span>
            <span class="fly-list-hint"> 
              <i class="iconfont" title="回答">&#xe60c;</i> {{item.comment}}
              <i class="iconfont" title="人气">&#xe60b;</i> {{item.hits}}
            </span>
          </p>
        </li>
      {{# } 
      }); }}
      </ul>
      
      <div style="text-align: center">
        <div class="laypage-main">
          <a href="/jie/page/2/" class="laypage-next">更多求解</a>
        </div>
      </div>
      
    </div>
  </div>
  <div class="edge">

    <div class="fly-panel leifeng-rank">
      <h3 class="fly-panel-title">近一月回答榜 - TOP 12</h3>
      <dl>
      {{# d.leifeng.forEach(function(item){ }}
        <dd>
          <a href="/u/{{168*item.uid}}">
            <img src="{{item.user.avatar}}">
            <cite>{{item.user.username}}</cite>
            <i>{{item['count(*)']}}次回答</i>
          </a>
        </dd>  
      {{# }); }}
      </dl>
    </div>
    
    <dl class="fly-panel fly-list-one">
      <dt class="fly-panel-title">最近热帖</dt>
      {{# d.hot.forEach(function(item){ }}
      <dd>
        <a href="/jie/{{item.id}}.html">{{= item.title }}</a>
        <span><i class="iconfont">&#xe60b;</i> {{item.hits}}</span>
      </dd>
      {{# }); }}
    </dl>
    
    <dl class="fly-panel fly-list-one">
      <dt class="fly-panel-title">近期热议</dt>
      {{# d.hotda.forEach(function(item){ }}
      <dd>
        <a href="/jie/{{item.id}}.html">{{= item.title }}</a>
        <span><i class="iconfont">&#xe60c;</i> {{item.comment}}</span>
      </dd>
      {{# }); }}
    </dl>
    
    <div class="fly-panel fly-link">
      <h3 class="fly-panel-title">友情链接</h3>
      <dl>
        <dd><a href="http://layim.layui.com/" target="_blank">LayIM</a><dd>
        <dd><a href="http://layer.layui.com/" target="_blank">layer</a><dd>
      </dl>
    </div>

  </div>
</div>

{{ include common/footer }}

</body>
</html>